import http from '@/utils/request'
class DictServiceTemp {
	useDictTypeAllApi() {
		return Promise.resolve([]);
		// return http.get('/sys/dict/type/all')
	}
	useDictTypeApi(id: Number) {
		return http.get('/sys/dict/type/' + id)
	}
	useDictTypeSubmitApi(dataForm: any) {
		if (dataForm.id) {
			return http.put('/sys/dict/type', dataForm)
		} else {
			return http.post('/sys/dict/type', dataForm)
		}
	}
	useDictDataApi(id: Number) {
		return http.get('/sys/dict/data/' + id)
	}
	useDictDataSubmitApi(dataForm: any) {
		if (dataForm.id) {
			return http.put('/sys/dict/data', dataForm)
		} else {
			return http.post('/sys/dict/data', dataForm)
		}
	}
}

const DictService = new DictServiceTemp();
export {
	DictService
}